<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2018/3/1
 * Time: 10:36
 */

namespace App\Http\Traits;


use Illuminate\Http\Request;

trait DianBoTrait
{
    use BaseTrait;



    // 事件通知版本号，固定为4.0
    protected $version;
    // 事件类型
    protected $eventType;
    // 具体回调数据
    protected $data;

    // 视频文件
    protected $video_file;

    public function __construct(Request $request)
    {
        if (!empty($request->file('video_file', ''))){
            $this->video_file = $request->file('video_file', '')->store('temp');
        }
        $this->version = $request->input('version', '');
        $this->eventType = $request->input('eventType', '');
        $this->data = $request->input('data', '');
    }
}